<!-- src/views/Home.vue -->
<template>
  
  <div class="center-container">
   
    <Headline/> 
    <div class="fragment-container">
    <div class="container1"><lunbo/></div>
  <div>
    <h1>Product List</h1>
    <ProductList :products="products" />
  <div class="page"><page/></div>
</div>
</div>
</div>
</template>

<script setup>
import { ref } from 'vue';
import ProductList from './components/productline.vue';
import Headline from'./components/Headline.vue'
import lunbo from './components/lunbo.vue';
import page from './components/page.vue';
import { onMounted } from 'vue';
import http from 'C:/Users/荣耀/OneDrive/桌面/项目/项目/ideavr_pro/src/utility/http.js'; // 确保路径正确
const products = ref([]);
const requset={
  'gamePageQueryDTO.pageNum': 1,
  'gamePageQueryDTO.pageSize': 5,

}
onMounted (()=>{
const products = ref([]);

products=http.get("/api/")
   })

</script>

<style scoped>
h1 {
  text-align: center;
  margin-bottom: 24px;
}
.center-container {
 
  position: fixed;
  top: 1%;
  left: 0;
  width: 100%;
  padding-left: 10%;
  padding-right: 10%;
  margin-left: auto;
  margin-right: auto;
  z-index: 1;
  overflow-y:scroll; /* 确保父容器不滚动 */
}
.container1 {
  margin-top: 0%;
  margin-bottom: 0%;
  /* 如果 lunbo 组件高度固定，请确保它不会影响滚动 */
  /* height: 固定值; */
  
}
.page{
  display: flex;
  justify-content: center; /* 水平居中 */
  align-items: center; /* 垂直居中 */
  /* 设置容器的高度和宽度，根据需要自定义 */
 /* height: 100vh; /* 100视口高度 */
  width: 100%; /* 宽度为100%，可根据需要调整 */ 
}
.fragment-container{
  height: 90vh;
  overflow-y: scroll;
  max-width: 100vw;
  margin: 0 auto;
}

</style>
